package cn.aitrox.ry.service.anno.controller;

import cn.aitrox.ry.bean.RespResult;
import cn.aitrox.ry.common.controller.BaseController;
import cn.aitrox.ry.service.anno.api.AnnoSettingApi;
import cn.aitrox.ry.service.anno.dto.anno.setting.in.AnnoSettingReadInDto;
import cn.aitrox.ry.service.anno.dto.anno.setting.out.AnnoSettingInfoDto;
import cn.aitrox.ry.service.anno.service.AnnoSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AnnoSettingController extends BaseController implements AnnoSettingApi {

    @Autowired
    private AnnoSettingService annoSettingService;

    @PostMapping(value = "/anno/setting/read")
    @Override
    public RespResult<AnnoSettingInfoDto> read(@Validated @RequestBody AnnoSettingReadInDto input) {
        return annoSettingService.read(input.getTaskId());
    }
}
